console.log(obj);
console.log(obj1);
//对象的函数解构
let json = {
    a : 'JSPang',
    b : '技术胖'
}

//必须要加大括号
function fun({a,b = 'web'}){
    console.log(a,b);
}

fun(json);

//数组解构
let arr = ['JSPang','技术胖','老民'];

function fun1(a,b,c){
    console.log(a,b,c);
}

fun1(...arr);

//in 的用法
let obj = {
    a : '技术胖',
    b : 'JSPang'
}

console.log('a' in obj);
console.log('c' in obj);

let arr2 = ['',,,];
console.log(0 in arr2);
console.log(1 in arr2);
console.log(2 in arr2);

//数组遍历
let arr3 = ['JSPang','技术胖','老民'];
arr3.forEach((value,index) => console.log(index + ':' + value));

arr3.filter(x => console.log(x));

arr3.some(x => console.log(x));

console.log(arr3.map(x => 'web'));

console.log(arr3.toString());
console.log(arr3.join('-'));